
<?php
use yii\widgets\LinkPager;
use yii\base\Object;
use yii\bootstrap\ActiveForm;
use common\utils\CommonFun;
use yii\helpers\Url;

use backend\models\Info;

$modelLabel = new \backend\models\Info();
?>

<?php $this->beginBlock('header');  ?>
<!-- <head></head>中代码块 -->
<?php $this->endBlock(); ?>

<!-- Main content -->
<section class="content">
  <div class="row">
    <div class="col-xs-12">
      <div class="box">
      
        <div class="box-header">
          <h3 class="box-title">数据列表</h3>
          <div class="box-tools">
            <div class="input-group input-group-sm" style="width: 150px;">
                <button id="create_btn" type="button" class="btn btn-xs btn-primary">添&nbsp;&emsp;加</button>
        			|
        		<button id="delete_btn" type="button" class="btn btn-xs btn-danger">批量删除</button>
            </div>
          </div>
        </div>
        <!-- /.box-header -->
        
        <div class="box-body">
          <div id="example1_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
            <!-- row start search-->
          	<div class="row">
          	<div class="col-sm-12">
                <?php ActiveForm::begin(['id' => 'info-search-form', 'method'=>'get', 'options' => ['class' => 'form-inline'], 'action'=>Url::toRoute('info/index')]); ?>     
                
                  <div class="form-group" style="margin: 5px;">
                      <label><?=$modelLabel->getAttributeLabel('id')?>:</label>
                      <input type="text" class="form-control" id="query[id]" name="query[id]"  value="<?=isset($query["id"]) ? $query["id"] : "" ?>">
                  </div>
              <div class="form-group">
              	<a onclick="searchAction()" class="btn btn-primary btn-sm" href="#"> <i class="glyphicon glyphicon-zoom-in icon-white"></i>搜索</a>
           	  </div>
               <?php ActiveForm::end(); ?> 
            </div>
          	</div>
          	<!-- row end search -->
          	
          	<!-- row start -->
          	<div class="row">
          	<div class="col-sm-12 table-responsive">
          	<table id="data_table" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="data_table_info">
            <thead>
            <tr role="row">
            
            <?php 
              $orderby = isset($_GET['orderby']) ? $_GET['orderby'] : '';
		      echo '<th><input id="data_table_check" type="checkbox"></th>';
              echo '<th onclick="orderby(\'id\', \'desc\')" '.CommonFun::sortClass($orderby, 'id').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('id').'</th>';
              echo '<th onclick="orderby(\'project_name\', \'desc\')" '.CommonFun::sortClass($orderby, 'project_name').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('project_name').'</th>';
              echo '<th onclick="orderby(\'img_pj_name\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_pj_name').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_pj_name').'</th>';
              echo '<th onclick="orderby(\'dept_name\', \'desc\')" '.CommonFun::sortClass($orderby, 'dept_name').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('dept_name').'</th>';
              echo '<th onclick="orderby(\'img_dp_name\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_dp_name').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_dp_name').'</th>';
              echo '<th onclick="orderby(\'user_name\', \'desc\')" '.CommonFun::sortClass($orderby, 'user_name').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('user_name').'</th>';
              echo '<th onclick="orderby(\'cell\', \'desc\')" '.CommonFun::sortClass($orderby, 'cell').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('cell').'</th>';
              echo '<th onclick="orderby(\'dept_addr\', \'desc\')" '.CommonFun::sortClass($orderby, 'dept_addr').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('dept_addr').'</th>';
              echo '<th onclick="orderby(\'img_dp_addr\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_dp_addr').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_dp_addr').'</th>';
              echo '<th onclick="orderby(\'project_addr\', \'desc\')" '.CommonFun::sortClass($orderby, 'project_addr').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('project_addr').'</th>';
              echo '<th onclick="orderby(\'img_pj_addr\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_pj_addr').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_pj_addr').'</th>';
              echo '<th onclick="orderby(\'zip_code\', \'desc\')" '.CommonFun::sortClass($orderby, 'zip_code').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('zip_code').'</th>';
              echo '<th onclick="orderby(\'fax\', \'desc\')" '.CommonFun::sortClass($orderby, 'fax').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('fax').'</th>';
              echo '<th onclick="orderby(\'approval\', \'desc\')" '.CommonFun::sortClass($orderby, 'approval').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('approval').'</th>';
              echo '<th onclick="orderby(\'construct_nature\', \'desc\')" '.CommonFun::sortClass($orderby, 'construct_nature').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('construct_nature').'</th>';
              echo '<th onclick="orderby(\'construct_area\', \'desc\')" '.CommonFun::sortClass($orderby, 'construct_area').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('construct_area').'</th>';
              echo '<th onclick="orderby(\'green_area\', \'desc\')" '.CommonFun::sortClass($orderby, 'green_area').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('green_area').'</th>';
              echo '<th onclick="orderby(\'tot_invest\', \'desc\')" '.CommonFun::sortClass($orderby, 'tot_invest').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('tot_invest').'</th>';
              echo '<th onclick="orderby(\'env_invest\', \'desc\')" '.CommonFun::sortClass($orderby, 'env_invest').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('env_invest').'</th>';
              echo '<th onclick="orderby(\'product_date\', \'desc\')" '.CommonFun::sortClass($orderby, 'product_date').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('product_date').'</th>';
              echo '<th onclick="orderby(\'construct_scale\', \'desc\')" '.CommonFun::sortClass($orderby, 'construct_scale').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('construct_scale').'</th>';
              echo '<th onclick="orderby(\'img_construct_scale\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_construct_scale').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_construct_scale').'</th>';
              echo '<th onclick="orderby(\'construct_content\', \'desc\')" '.CommonFun::sortClass($orderby, 'construct_content').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('construct_content').'</th>';
              echo '<th onclick="orderby(\'img_construct_content\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_construct_content').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_construct_content').'</th>';
              echo '<th onclick="orderby(\'construct_material\', \'desc\')" '.CommonFun::sortClass($orderby, 'construct_material').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('construct_material').'</th>';
              echo '<th onclick="orderby(\'img_construct_material\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_construct_material').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_construct_material').'</th>';
              echo '<th onclick="orderby(\'constrcut_power\', \'desc\')" '.CommonFun::sortClass($orderby, 'constrcut_power').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('constrcut_power').'</th>';
              echo '<th onclick="orderby(\'img_constrcut_power\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_constrcut_power').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_constrcut_power').'</th>';
              echo '<th onclick="orderby(\'construct_equipment\', \'desc\')" '.CommonFun::sortClass($orderby, 'construct_equipment').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('construct_equipment').'</th>';
              echo '<th onclick="orderby(\'img_construct_equipment\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_construct_equipment').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_construct_equipment').'</th>';
              echo '<th onclick="orderby(\'construct_technique\', \'desc\')" '.CommonFun::sortClass($orderby, 'construct_technique').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('construct_technique').'</th>';
              echo '<th onclick="orderby(\'img_construct_technique\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_construct_technique').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_construct_technique').'</th>';
              echo '<th onclick="orderby(\'construct_system\', \'desc\')" '.CommonFun::sortClass($orderby, 'construct_system').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('construct_system').'</th>';
              echo '<th onclick="orderby(\'img_construct_system\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_construct_system').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_construct_system').'</th>';
              echo '<th onclick="orderby(\'construct_staff\', \'desc\')" '.CommonFun::sortClass($orderby, 'construct_staff').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('construct_staff').'</th>';
              echo '<th onclick="orderby(\'img_construct_staff\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_construct_staff').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_construct_staff').'</th>';
              echo '<th onclick="orderby(\'construct_water\', \'desc\')" '.CommonFun::sortClass($orderby, 'construct_water').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('construct_water').'</th>';
              echo '<th onclick="orderby(\'img_construct_water\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_construct_water').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_construct_water').'</th>';
              echo '<th onclick="orderby(\'drain_away\', \'desc\')" '.CommonFun::sortClass($orderby, 'drain_away').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('drain_away').'</th>';
              echo '<th onclick="orderby(\'img_drain_away\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_drain_away').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_drain_away').'</th>';
              echo '<th onclick="orderby(\'power_supply\', \'desc\')" '.CommonFun::sortClass($orderby, 'power_supply').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('power_supply').'</th>';
              echo '<th onclick="orderby(\'east\', \'desc\')" '.CommonFun::sortClass($orderby, 'east').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('east').'</th>';
              echo '<th onclick="orderby(\'img_east\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_east').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_east').'</th>';
              echo '<th onclick="orderby(\'west\', \'desc\')" '.CommonFun::sortClass($orderby, 'west').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('west').'</th>';
              echo '<th onclick="orderby(\'img_west\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_west').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_west').'</th>';
              echo '<th onclick="orderby(\'south\', \'desc\')" '.CommonFun::sortClass($orderby, 'south').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('south').'</th>';
              echo '<th onclick="orderby(\'img_south\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_south').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_south').'</th>';
              echo '<th onclick="orderby(\'north\', \'desc\')" '.CommonFun::sortClass($orderby, 'north').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('north').'</th>';
              echo '<th onclick="orderby(\'img_north\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_north').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_north').'</th>';
              echo '<th onclick="orderby(\'coord\', \'desc\')" '.CommonFun::sortClass($orderby, 'coord').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('coord').'</th>';
              echo '<th onclick="orderby(\'img_coord\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_coord').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_coord').'</th>';
              echo '<th onclick="orderby(\'img_arrangement_plan\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_arrangement_plan').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_arrangement_plan').'</th>';
              echo '<th onclick="orderby(\'img_licence\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_licence').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_licence').'</th>';
              echo '<th onclick="orderby(\'img_sewage_product\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_sewage_product').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_sewage_product').'</th>';
              echo '<th onclick="orderby(\'img_sewage_deal\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_sewage_deal').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_sewage_deal').'</th>';
              echo '<th onclick="orderby(\'img_gas_product\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_gas_product').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_gas_product').'</th>';
              echo '<th onclick="orderby(\'img_gas_deal\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_gas_deal').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_gas_deal').'</th>';
              echo '<th onclick="orderby(\'img_gas_go\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_gas_go').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_gas_go').'</th>';
              echo '<th onclick="orderby(\'img_weast_collect\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_weast_collect').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_weast_collect').'</th>';
              echo '<th onclick="orderby(\'img_trash_collect\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_trash_collect').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_trash_collect').'</th>';
              echo '<th onclick="orderby(\'img_noice_control\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_noice_control').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_noice_control').'</th>';
              echo '<th onclick="orderby(\'img_satellite\', \'desc\')" '.CommonFun::sortClass($orderby, 'img_satellite').' tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >'.$modelLabel->getAttributeLabel('img_satellite').'</th>';
         
			?>
	
            <th tabindex="0" aria-controls="data_table" rowspan="1" colspan="1" aria-sort="ascending" >操作</th>
            </tr>
            </thead>
            <tbody>
            
            <?php
            foreach ($models as $model) {
                echo '<tr id="rowid_' . $model->id . '">';
                echo '  <td><label><input type="checkbox" value="' . $model->id . '"></label></td>';
                echo '  <td>' . $model->id . '</td>';
                echo '  <td>' . $model->project_name . '</td>';
                echo '  <td>' . $model->img_pj_name . '</td>';
                echo '  <td>' . $model->dept_name . '</td>';
                echo '  <td>' . $model->img_dp_name . '</td>';
                echo '  <td>' . $model->user_name . '</td>';
                echo '  <td>' . $model->cell . '</td>';
                echo '  <td>' . $model->dept_addr . '</td>';
                echo '  <td>' . $model->img_dp_addr . '</td>';
                echo '  <td>' . $model->project_addr . '</td>';
                echo '  <td>' . $model->img_pj_addr . '</td>';
                echo '  <td>' . $model->zip_code . '</td>';
                echo '  <td>' . $model->fax . '</td>';
                echo '  <td>' . $model->approval . '</td>';
                echo '  <td>' . $model->construct_nature . '</td>';
                echo '  <td>' . $model->construct_area . '</td>';
                echo '  <td>' . $model->green_area . '</td>';
                echo '  <td>' . $model->tot_invest . '</td>';
                echo '  <td>' . $model->env_invest . '</td>';
                echo '  <td>' . $model->product_date . '</td>';
                echo '  <td>' . $model->construct_scale . '</td>';
                echo '  <td>' . $model->img_construct_scale . '</td>';
                echo '  <td>' . $model->construct_content . '</td>';
                echo '  <td>' . $model->img_construct_content . '</td>';
                echo '  <td>' . $model->construct_material . '</td>';
                echo '  <td>' . $model->img_construct_material . '</td>';
                echo '  <td>' . $model->constrcut_power . '</td>';
                echo '  <td>' . $model->img_constrcut_power . '</td>';
                echo '  <td>' . $model->construct_equipment . '</td>';
                echo '  <td>' . $model->img_construct_equipment . '</td>';
                echo '  <td>' . $model->construct_technique . '</td>';
                echo '  <td>' . $model->img_construct_technique . '</td>';
                echo '  <td>' . $model->construct_system . '</td>';
                echo '  <td>' . $model->img_construct_system . '</td>';
                echo '  <td>' . $model->construct_staff . '</td>';
                echo '  <td>' . $model->img_construct_staff . '</td>';
                echo '  <td>' . $model->construct_water . '</td>';
                echo '  <td>' . $model->img_construct_water . '</td>';
                echo '  <td>' . $model->drain_away . '</td>';
                echo '  <td>' . $model->img_drain_away . '</td>';
                echo '  <td>' . $model->power_supply . '</td>';
                echo '  <td>' . $model->east . '</td>';
                echo '  <td>' . $model->img_east . '</td>';
                echo '  <td>' . $model->west . '</td>';
                echo '  <td>' . $model->img_west . '</td>';
                echo '  <td>' . $model->south . '</td>';
                echo '  <td>' . $model->img_south . '</td>';
                echo '  <td>' . $model->north . '</td>';
                echo '  <td>' . $model->img_north . '</td>';
                echo '  <td>' . $model->coord . '</td>';
                echo '  <td>' . $model->img_coord . '</td>';
                echo '  <td>' . $model->img_arrangement_plan . '</td>';
                echo '  <td>' . $model->img_licence . '</td>';
                echo '  <td>' . $model->img_sewage_product . '</td>';
                echo '  <td>' . $model->img_sewage_deal . '</td>';
                echo '  <td>' . $model->img_gas_product . '</td>';
                echo '  <td>' . $model->img_gas_deal . '</td>';
                echo '  <td>' . $model->img_gas_go . '</td>';
                echo '  <td>' . $model->img_weast_collect . '</td>';
                echo '  <td>' . $model->img_trash_collect . '</td>';
                echo '  <td>' . $model->img_noice_control . '</td>';
                echo '  <td>' . $model->img_satellite . '</td>';
                echo '  <td class="center">';
                echo '      <a id="view_btn" onclick="viewAction(' . $model->id . ')" class="btn btn-primary btn-sm" href="#"> <i class="glyphicon glyphicon-zoom-in icon-white"></i>查看</a>';
                echo '      <a id="edit_btn" onclick="editAction(' . $model->id . ')" class="btn btn-primary btn-sm" href="#"> <i class="glyphicon glyphicon-edit icon-white"></i>修改</a>';
                echo '      <a id="delete_btn" onclick="deleteAction(' . $model->id . ')" class="btn btn-danger btn-sm" href="#"> <i class="glyphicon glyphicon-trash icon-white"></i>删除</a>';
                echo '  </td>';
                echo '</tr>';
            }
            
            ?>
            
           
           
            </tbody>
            <!-- <tfoot></tfoot> -->
          </table>
          </div>
          </div>
          <!-- row end -->
          
          <!-- row start -->
          <div class="row">
          	<div class="col-sm-5">
            	<div class="dataTables_info" id="data_table_info" role="status" aria-live="polite">
            		<div class="infos">
            		从<?= $pages->getPage() * $pages->getPageSize() + 1 ?>            		到 <?= ($pageCount = ($pages->getPage() + 1) * $pages->getPageSize()) < $pages->totalCount ?  $pageCount : $pages->totalCount?>            		 共 <?= $pages->totalCount?> 条记录</div>
            	</div>
            </div>
          	<div class="col-sm-7">
              	<div class="dataTables_paginate paging_simple_numbers" id="data_table_paginate">
              	<?= LinkPager::widget([
              	    'pagination' => $pages,
              	    'nextPageLabel' => '»',
              	    'prevPageLabel' => '«',
              	    'firstPageLabel' => '首页',
              	    'lastPageLabel' => '尾页',
              	]); ?>	
              	
              	</div>
          	</div>
		  </div>
		  <!-- row end -->
        </div>
        </div>
        <!-- /.box-body -->
      </div>
      <!-- /.box -->
    </div>
    <!-- /.col -->
  </div>
  <!-- /.row -->
</section>
<!-- /.content -->

<div class="modal fade" id="edit_dialog" tabindex="-1" role="dialog"
	aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">×</button>
				<h3>Settings</h3>
			</div>
			<div class="modal-body">
                <?php $form = ActiveForm::begin(["id" => "info-form", "class"=>"form-horizontal", "action"=>Url::toRoute("info/save")]); ?>                      
                 
          <input type="hidden" class="form-control" id="id" name="id" />

          <div id="project_name_div" class="form-group">
              <label for="project_name" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("project_name")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="project_name" name="Info[project_name]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_pj_name_div" class="form-group">
              <label for="img_pj_name" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_pj_name")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_pj_name" name="Info[img_pj_name]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="dept_name_div" class="form-group">
              <label for="dept_name" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("dept_name")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="dept_name" name="Info[dept_name]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_dp_name_div" class="form-group">
              <label for="img_dp_name" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_dp_name")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_dp_name" name="Info[img_dp_name]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="user_name_div" class="form-group">
              <label for="user_name" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("user_name")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="user_name" name="Info[user_name]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="cell_div" class="form-group">
              <label for="cell" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("cell")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="cell" name="Info[cell]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="dept_addr_div" class="form-group">
              <label for="dept_addr" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("dept_addr")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="dept_addr" name="Info[dept_addr]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_dp_addr_div" class="form-group">
              <label for="img_dp_addr" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_dp_addr")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_dp_addr" name="Info[img_dp_addr]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="project_addr_div" class="form-group">
              <label for="project_addr" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("project_addr")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="project_addr" name="Info[project_addr]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_pj_addr_div" class="form-group">
              <label for="img_pj_addr" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_pj_addr")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_pj_addr" name="Info[img_pj_addr]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="zip_code_div" class="form-group">
              <label for="zip_code" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("zip_code")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="zip_code" name="Info[zip_code]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="fax_div" class="form-group">
              <label for="fax" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("fax")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="fax" name="Info[fax]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="approval_div" class="form-group">
              <label for="approval" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("approval")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="approval" name="Info[approval]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="construct_nature_div" class="form-group">
              <label for="construct_nature" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("construct_nature")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="construct_nature" name="Info[construct_nature]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="construct_area_div" class="form-group">
              <label for="construct_area" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("construct_area")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="construct_area" name="Info[construct_area]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="green_area_div" class="form-group">
              <label for="green_area" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("green_area")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="green_area" name="Info[green_area]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="tot_invest_div" class="form-group">
              <label for="tot_invest" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("tot_invest")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="tot_invest" name="Info[tot_invest]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="env_invest_div" class="form-group">
              <label for="env_invest" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("env_invest")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="env_invest" name="Info[env_invest]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="product_date_div" class="form-group">
              <label for="product_date" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("product_date")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="product_date" name="Info[product_date]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="construct_scale_div" class="form-group">
              <label for="construct_scale" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("construct_scale")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="construct_scale" name="Info[construct_scale]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_construct_scale_div" class="form-group">
              <label for="img_construct_scale" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_construct_scale")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_construct_scale" name="Info[img_construct_scale]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="construct_content_div" class="form-group">
              <label for="construct_content" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("construct_content")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="construct_content" name="Info[construct_content]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_construct_content_div" class="form-group">
              <label for="img_construct_content" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_construct_content")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_construct_content" name="Info[img_construct_content]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="construct_material_div" class="form-group">
              <label for="construct_material" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("construct_material")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="construct_material" name="Info[construct_material]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_construct_material_div" class="form-group">
              <label for="img_construct_material" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_construct_material")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_construct_material" name="Info[img_construct_material]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="constrcut_power_div" class="form-group">
              <label for="constrcut_power" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("constrcut_power")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="constrcut_power" name="Info[constrcut_power]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_constrcut_power_div" class="form-group">
              <label for="img_constrcut_power" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_constrcut_power")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_constrcut_power" name="Info[img_constrcut_power]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="construct_equipment_div" class="form-group">
              <label for="construct_equipment" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("construct_equipment")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="construct_equipment" name="Info[construct_equipment]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_construct_equipment_div" class="form-group">
              <label for="img_construct_equipment" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_construct_equipment")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_construct_equipment" name="Info[img_construct_equipment]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="construct_technique_div" class="form-group">
              <label for="construct_technique" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("construct_technique")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="construct_technique" name="Info[construct_technique]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_construct_technique_div" class="form-group">
              <label for="img_construct_technique" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_construct_technique")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_construct_technique" name="Info[img_construct_technique]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="construct_system_div" class="form-group">
              <label for="construct_system" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("construct_system")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="construct_system" name="Info[construct_system]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_construct_system_div" class="form-group">
              <label for="img_construct_system" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_construct_system")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_construct_system" name="Info[img_construct_system]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="construct_staff_div" class="form-group">
              <label for="construct_staff" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("construct_staff")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="construct_staff" name="Info[construct_staff]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_construct_staff_div" class="form-group">
              <label for="img_construct_staff" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_construct_staff")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_construct_staff" name="Info[img_construct_staff]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="construct_water_div" class="form-group">
              <label for="construct_water" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("construct_water")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="construct_water" name="Info[construct_water]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_construct_water_div" class="form-group">
              <label for="img_construct_water" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_construct_water")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_construct_water" name="Info[img_construct_water]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="drain_away_div" class="form-group">
              <label for="drain_away" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("drain_away")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="drain_away" name="Info[drain_away]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_drain_away_div" class="form-group">
              <label for="img_drain_away" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_drain_away")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_drain_away" name="Info[img_drain_away]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="power_supply_div" class="form-group">
              <label for="power_supply" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("power_supply")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="power_supply" name="Info[power_supply]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="east_div" class="form-group">
              <label for="east" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("east")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="east" name="Info[east]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_east_div" class="form-group">
              <label for="img_east" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_east")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_east" name="Info[img_east]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="west_div" class="form-group">
              <label for="west" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("west")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="west" name="Info[west]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_west_div" class="form-group">
              <label for="img_west" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_west")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_west" name="Info[img_west]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="south_div" class="form-group">
              <label for="south" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("south")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="south" name="Info[south]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_south_div" class="form-group">
              <label for="img_south" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_south")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_south" name="Info[img_south]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="north_div" class="form-group">
              <label for="north" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("north")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="north" name="Info[north]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_north_div" class="form-group">
              <label for="img_north" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_north")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_north" name="Info[img_north]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="coord_div" class="form-group">
              <label for="coord" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("coord")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="coord" name="Info[coord]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_coord_div" class="form-group">
              <label for="img_coord" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_coord")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_coord" name="Info[img_coord]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_arrangement_plan_div" class="form-group">
              <label for="img_arrangement_plan" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_arrangement_plan")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_arrangement_plan" name="Info[img_arrangement_plan]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_licence_div" class="form-group">
              <label for="img_licence" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_licence")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_licence" name="Info[img_licence]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_sewage_product_div" class="form-group">
              <label for="img_sewage_product" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_sewage_product")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_sewage_product" name="Info[img_sewage_product]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_sewage_deal_div" class="form-group">
              <label for="img_sewage_deal" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_sewage_deal")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_sewage_deal" name="Info[img_sewage_deal]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_gas_product_div" class="form-group">
              <label for="img_gas_product" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_gas_product")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_gas_product" name="Info[img_gas_product]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_gas_deal_div" class="form-group">
              <label for="img_gas_deal" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_gas_deal")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_gas_deal" name="Info[img_gas_deal]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_gas_go_div" class="form-group">
              <label for="img_gas_go" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_gas_go")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_gas_go" name="Info[img_gas_go]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_weast_collect_div" class="form-group">
              <label for="img_weast_collect" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_weast_collect")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_weast_collect" name="Info[img_weast_collect]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_trash_collect_div" class="form-group">
              <label for="img_trash_collect" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_trash_collect")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_trash_collect" name="Info[img_trash_collect]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_noice_control_div" class="form-group">
              <label for="img_noice_control" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_noice_control")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_noice_control" name="Info[img_noice_control]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>

          <div id="img_satellite_div" class="form-group">
              <label for="img_satellite" class="col-sm-2 control-label"><?php echo $modelLabel->getAttributeLabel("img_satellite")?></label>
              <div class="col-sm-10">
                  <input type="text" class="form-control" id="img_satellite" name="Info[img_satellite]" placeholder="" />
              </div>
              <div class="clearfix"></div>
          </div>
                    

			<?php ActiveForm::end(); ?>          
                </div>
			<div class="modal-footer">
				<a href="#" class="btn btn-default" data-dismiss="modal">关闭</a> <a
					id="edit_dialog_ok" href="#" class="btn btn-primary">确定</a>
			</div>
		</div>
	</div>
</div>
<?php $this->beginBlock('footer');  ?>
<!-- <body></body>后代码块 -->
 <script>
function orderby(field, op){
	 var url = window.location.search;
	 var optemp = field + " desc";
	 if(url.indexOf('orderby') != -1){
		 url = url.replace(/orderby=([^&?]*)/ig,  function($0, $1){ 
			 var optemp = field + " desc";
			 optemp = decodeURI($1) != optemp ? optemp : field + " asc";
			 return "orderby=" + optemp;
		   }); 
	 }
	 else{
		 if(url.indexOf('?') != -1){
			 url = url + "&orderby=" + encodeURI(optemp);
		 }
		 else{
			 url = url + "?orderby=" + encodeURI(optemp);
		 }
	 }
	 window.location.href=url; 
 }
 function searchAction(){
		$('#info-search-form').submit();
	}
 function viewAction(id){
		initModel(id, 'view', 'fun');
	}

 function initEditSystemModule(data, type){
	if(type == 'create'){
		$("#id").val('');
		$("#project_name").val('');
		$("#img_pj_name").val('');
		$("#dept_name").val('');
		$("#img_dp_name").val('');
		$("#user_name").val('');
		$("#cell").val('');
		$("#dept_addr").val('');
		$("#img_dp_addr").val('');
		$("#project_addr").val('');
		$("#img_pj_addr").val('');
		$("#zip_code").val('');
		$("#fax").val('');
		$("#approval").val('');
		$("#construct_nature").val('');
		$("#construct_area").val('');
		$("#green_area").val('');
		$("#tot_invest").val('');
		$("#env_invest").val('');
		$("#product_date").val('');
		$("#construct_scale").val('');
		$("#img_construct_scale").val('');
		$("#construct_content").val('');
		$("#img_construct_content").val('');
		$("#construct_material").val('');
		$("#img_construct_material").val('');
		$("#constrcut_power").val('');
		$("#img_constrcut_power").val('');
		$("#construct_equipment").val('');
		$("#img_construct_equipment").val('');
		$("#construct_technique").val('');
		$("#img_construct_technique").val('');
		$("#construct_system").val('');
		$("#img_construct_system").val('');
		$("#construct_staff").val('');
		$("#img_construct_staff").val('');
		$("#construct_water").val('');
		$("#img_construct_water").val('');
		$("#drain_away").val('');
		$("#img_drain_away").val('');
		$("#power_supply").val('');
		$("#east").val('');
		$("#img_east").val('');
		$("#west").val('');
		$("#img_west").val('');
		$("#south").val('');
		$("#img_south").val('');
		$("#north").val('');
		$("#img_north").val('');
		$("#coord").val('');
		$("#img_coord").val('');
		$("#img_arrangement_plan").val('');
		$("#img_licence").val('');
		$("#img_sewage_product").val('');
		$("#img_sewage_deal").val('');
		$("#img_gas_product").val('');
		$("#img_gas_deal").val('');
		$("#img_gas_go").val('');
		$("#img_weast_collect").val('');
		$("#img_trash_collect").val('');
		$("#img_noice_control").val('');
		$("#img_satellite").val('');
		
	}
	else{
		$("#id").val(data.id);
    	$("#project_name").val(data.project_name);
    	$("#img_pj_name").val(data.img_pj_name);
    	$("#dept_name").val(data.dept_name);
    	$("#img_dp_name").val(data.img_dp_name);
    	$("#user_name").val(data.user_name);
    	$("#cell").val(data.cell);
    	$("#dept_addr").val(data.dept_addr);
    	$("#img_dp_addr").val(data.img_dp_addr);
    	$("#project_addr").val(data.project_addr);
    	$("#img_pj_addr").val(data.img_pj_addr);
    	$("#zip_code").val(data.zip_code);
    	$("#fax").val(data.fax);
    	$("#approval").val(data.approval);
    	$("#construct_nature").val(data.construct_nature);
    	$("#construct_area").val(data.construct_area);
    	$("#green_area").val(data.green_area);
    	$("#tot_invest").val(data.tot_invest);
    	$("#env_invest").val(data.env_invest);
    	$("#product_date").val(data.product_date);
    	$("#construct_scale").val(data.construct_scale);
    	$("#img_construct_scale").val(data.img_construct_scale);
    	$("#construct_content").val(data.construct_content);
    	$("#img_construct_content").val(data.img_construct_content);
    	$("#construct_material").val(data.construct_material);
    	$("#img_construct_material").val(data.img_construct_material);
    	$("#constrcut_power").val(data.constrcut_power);
    	$("#img_constrcut_power").val(data.img_constrcut_power);
    	$("#construct_equipment").val(data.construct_equipment);
    	$("#img_construct_equipment").val(data.img_construct_equipment);
    	$("#construct_technique").val(data.construct_technique);
    	$("#img_construct_technique").val(data.img_construct_technique);
    	$("#construct_system").val(data.construct_system);
    	$("#img_construct_system").val(data.img_construct_system);
    	$("#construct_staff").val(data.construct_staff);
    	$("#img_construct_staff").val(data.img_construct_staff);
    	$("#construct_water").val(data.construct_water);
    	$("#img_construct_water").val(data.img_construct_water);
    	$("#drain_away").val(data.drain_away);
    	$("#img_drain_away").val(data.img_drain_away);
    	$("#power_supply").val(data.power_supply);
    	$("#east").val(data.east);
    	$("#img_east").val(data.img_east);
    	$("#west").val(data.west);
    	$("#img_west").val(data.img_west);
    	$("#south").val(data.south);
    	$("#img_south").val(data.img_south);
    	$("#north").val(data.north);
    	$("#img_north").val(data.img_north);
    	$("#coord").val(data.coord);
    	$("#img_coord").val(data.img_coord);
    	$("#img_arrangement_plan").val(data.img_arrangement_plan);
    	$("#img_licence").val(data.img_licence);
    	$("#img_sewage_product").val(data.img_sewage_product);
    	$("#img_sewage_deal").val(data.img_sewage_deal);
    	$("#img_gas_product").val(data.img_gas_product);
    	$("#img_gas_deal").val(data.img_gas_deal);
    	$("#img_gas_go").val(data.img_gas_go);
    	$("#img_weast_collect").val(data.img_weast_collect);
    	$("#img_trash_collect").val(data.img_trash_collect);
    	$("#img_noice_control").val(data.img_noice_control);
    	$("#img_satellite").val(data.img_satellite);
    	}
	if(type == "view"){
      $("#id").attr({readonly:true,disabled:true});
      $("#project_name").attr({readonly:true,disabled:true});
      $("#img_pj_name").attr({readonly:true,disabled:true});
      $("#dept_name").attr({readonly:true,disabled:true});
      $("#img_dp_name").attr({readonly:true,disabled:true});
      $("#user_name").attr({readonly:true,disabled:true});
      $("#cell").attr({readonly:true,disabled:true});
      $("#dept_addr").attr({readonly:true,disabled:true});
      $("#img_dp_addr").attr({readonly:true,disabled:true});
      $("#project_addr").attr({readonly:true,disabled:true});
      $("#img_pj_addr").attr({readonly:true,disabled:true});
      $("#zip_code").attr({readonly:true,disabled:true});
      $("#fax").attr({readonly:true,disabled:true});
      $("#approval").attr({readonly:true,disabled:true});
      $("#construct_nature").attr({readonly:true,disabled:true});
      $("#construct_area").attr({readonly:true,disabled:true});
      $("#green_area").attr({readonly:true,disabled:true});
      $("#tot_invest").attr({readonly:true,disabled:true});
      $("#env_invest").attr({readonly:true,disabled:true});
      $("#product_date").attr({readonly:true,disabled:true});
      $("#construct_scale").attr({readonly:true,disabled:true});
      $("#img_construct_scale").attr({readonly:true,disabled:true});
      $("#construct_content").attr({readonly:true,disabled:true});
      $("#img_construct_content").attr({readonly:true,disabled:true});
      $("#construct_material").attr({readonly:true,disabled:true});
      $("#img_construct_material").attr({readonly:true,disabled:true});
      $("#constrcut_power").attr({readonly:true,disabled:true});
      $("#img_constrcut_power").attr({readonly:true,disabled:true});
      $("#construct_equipment").attr({readonly:true,disabled:true});
      $("#img_construct_equipment").attr({readonly:true,disabled:true});
      $("#construct_technique").attr({readonly:true,disabled:true});
      $("#img_construct_technique").attr({readonly:true,disabled:true});
      $("#construct_system").attr({readonly:true,disabled:true});
      $("#img_construct_system").attr({readonly:true,disabled:true});
      $("#construct_staff").attr({readonly:true,disabled:true});
      $("#img_construct_staff").attr({readonly:true,disabled:true});
      $("#construct_water").attr({readonly:true,disabled:true});
      $("#img_construct_water").attr({readonly:true,disabled:true});
      $("#drain_away").attr({readonly:true,disabled:true});
      $("#img_drain_away").attr({readonly:true,disabled:true});
      $("#power_supply").attr({readonly:true,disabled:true});
      $("#east").attr({readonly:true,disabled:true});
      $("#img_east").attr({readonly:true,disabled:true});
      $("#west").attr({readonly:true,disabled:true});
      $("#img_west").attr({readonly:true,disabled:true});
      $("#south").attr({readonly:true,disabled:true});
      $("#img_south").attr({readonly:true,disabled:true});
      $("#north").attr({readonly:true,disabled:true});
      $("#img_north").attr({readonly:true,disabled:true});
      $("#coord").attr({readonly:true,disabled:true});
      $("#img_coord").attr({readonly:true,disabled:true});
      $("#img_arrangement_plan").attr({readonly:true,disabled:true});
      $("#img_licence").attr({readonly:true,disabled:true});
      $("#img_sewage_product").attr({readonly:true,disabled:true});
      $("#img_sewage_deal").attr({readonly:true,disabled:true});
      $("#img_gas_product").attr({readonly:true,disabled:true});
      $("#img_gas_deal").attr({readonly:true,disabled:true});
      $("#img_gas_go").attr({readonly:true,disabled:true});
      $("#img_weast_collect").attr({readonly:true,disabled:true});
      $("#img_trash_collect").attr({readonly:true,disabled:true});
      $("#img_noice_control").attr({readonly:true,disabled:true});
      $("#img_satellite").attr({readonly:true,disabled:true});
	$('#edit_dialog_ok').addClass('hidden');
	}
	else{
      $("#id").attr({readonly:false,disabled:false});
      $("#project_name").attr({readonly:false,disabled:false});
      $("#img_pj_name").attr({readonly:false,disabled:false});
      $("#dept_name").attr({readonly:false,disabled:false});
      $("#img_dp_name").attr({readonly:false,disabled:false});
      $("#user_name").attr({readonly:false,disabled:false});
      $("#cell").attr({readonly:false,disabled:false});
      $("#dept_addr").attr({readonly:false,disabled:false});
      $("#img_dp_addr").attr({readonly:false,disabled:false});
      $("#project_addr").attr({readonly:false,disabled:false});
      $("#img_pj_addr").attr({readonly:false,disabled:false});
      $("#zip_code").attr({readonly:false,disabled:false});
      $("#fax").attr({readonly:false,disabled:false});
      $("#approval").attr({readonly:false,disabled:false});
      $("#construct_nature").attr({readonly:false,disabled:false});
      $("#construct_area").attr({readonly:false,disabled:false});
      $("#green_area").attr({readonly:false,disabled:false});
      $("#tot_invest").attr({readonly:false,disabled:false});
      $("#env_invest").attr({readonly:false,disabled:false});
      $("#product_date").attr({readonly:false,disabled:false});
      $("#construct_scale").attr({readonly:false,disabled:false});
      $("#img_construct_scale").attr({readonly:false,disabled:false});
      $("#construct_content").attr({readonly:false,disabled:false});
      $("#img_construct_content").attr({readonly:false,disabled:false});
      $("#construct_material").attr({readonly:false,disabled:false});
      $("#img_construct_material").attr({readonly:false,disabled:false});
      $("#constrcut_power").attr({readonly:false,disabled:false});
      $("#img_constrcut_power").attr({readonly:false,disabled:false});
      $("#construct_equipment").attr({readonly:false,disabled:false});
      $("#img_construct_equipment").attr({readonly:false,disabled:false});
      $("#construct_technique").attr({readonly:false,disabled:false});
      $("#img_construct_technique").attr({readonly:false,disabled:false});
      $("#construct_system").attr({readonly:false,disabled:false});
      $("#img_construct_system").attr({readonly:false,disabled:false});
      $("#construct_staff").attr({readonly:false,disabled:false});
      $("#img_construct_staff").attr({readonly:false,disabled:false});
      $("#construct_water").attr({readonly:false,disabled:false});
      $("#img_construct_water").attr({readonly:false,disabled:false});
      $("#drain_away").attr({readonly:false,disabled:false});
      $("#img_drain_away").attr({readonly:false,disabled:false});
      $("#power_supply").attr({readonly:false,disabled:false});
      $("#east").attr({readonly:false,disabled:false});
      $("#img_east").attr({readonly:false,disabled:false});
      $("#west").attr({readonly:false,disabled:false});
      $("#img_west").attr({readonly:false,disabled:false});
      $("#south").attr({readonly:false,disabled:false});
      $("#img_south").attr({readonly:false,disabled:false});
      $("#north").attr({readonly:false,disabled:false});
      $("#img_north").attr({readonly:false,disabled:false});
      $("#coord").attr({readonly:false,disabled:false});
      $("#img_coord").attr({readonly:false,disabled:false});
      $("#img_arrangement_plan").attr({readonly:false,disabled:false});
      $("#img_licence").attr({readonly:false,disabled:false});
      $("#img_sewage_product").attr({readonly:false,disabled:false});
      $("#img_sewage_deal").attr({readonly:false,disabled:false});
      $("#img_gas_product").attr({readonly:false,disabled:false});
      $("#img_gas_deal").attr({readonly:false,disabled:false});
      $("#img_gas_go").attr({readonly:false,disabled:false});
      $("#img_weast_collect").attr({readonly:false,disabled:false});
      $("#img_trash_collect").attr({readonly:false,disabled:false});
      $("#img_noice_control").attr({readonly:false,disabled:false});
      $("#img_satellite").attr({readonly:false,disabled:false});
		$('#edit_dialog_ok').removeClass('hidden');
		}
		$('#edit_dialog').modal('show');
}

function initModel(id, type, fun){
	
	$.ajax({
		   type: "GET",
		   url: "<?=Url::toRoute('info/view')?>",
		   data: {"id":id},
		   cache: false,
		   dataType:"json",
		   error: function (xmlHttpRequest, textStatus, errorThrown) {
			    alert("出错了，" + textStatus);
			},
		   success: function(data){
			   initEditSystemModule(data, type);
		   }
		});
}
	
function editAction(id){
	initModel(id, 'edit');
}

function deleteAction(id){
	var ids = [];
	if(!!id == true){
		ids[0] = id;
	}
	else{
		var checkboxs = $('#data_table :checked');
	    if(checkboxs.size() > 0){
	        var c = 0;
	        for(i = 0; i < checkboxs.size(); i++){
	            var id = checkboxs.eq(i).val();
	            if(id != ""){
	            	ids[c++] = id;
	            }
	        }
	    }
	}
	if(ids.length > 0){
		admin_tool.confirm('请确认是否删除', function(){
		    $.ajax({
				   type: "GET",
				   url: "<?=Url::toRoute('info/delete')?>",
				   data: {"ids":ids},
				   cache: false,
				   dataType:"json",
				   error: function (xmlHttpRequest, textStatus, errorThrown) {
					    admin_tool.alert('msg_info', '出错了，' + textStatus, 'warning');
					},
				   success: function(data){
					   for(i = 0; i < ids.length; i++){
						   $('#rowid_' + ids[i]).remove();
					   }
					   admin_tool.alert('msg_info', '删除成功', 'success');
					   window.location.reload();
				   }
				});
		});
	}
	else{
		admin_tool.alert('msg_info', '请先选择要删除的数据', 'warning');
	}
    
}

function getSelectedIdValues(formId)
{
	var value="";
	$( formId + " :checked").each(function(i)
	{
		if(!this.checked)
		{
			return true;
		}
		value += this.value;
		if(i != $("input[name='id']").size()-1)
		{
			value += ",";
		}
	 });
	return value;
}

$('#edit_dialog_ok').click(function (e) {
    e.preventDefault();
	$('#info-form').submit();
});

$('#create_btn').click(function (e) {
    e.preventDefault();
    initEditSystemModule({}, 'create');
});

$('#delete_btn').click(function (e) {
    e.preventDefault();
    deleteAction('');
});

$('#info-form').bind('submit', function(e) {
	e.preventDefault();
	var id = $("#id").val();
	var action = id == "" ? "<?=Url::toRoute('info/create')?>" : "<?=Url::toRoute('info/update')?>";
    $(this).ajaxSubmit({
    	type: "post",
    	dataType:"json",
    	url: action,
    	success: function(value) 
    	{
        	if(value.errno == 0){
        		$('#edit_dialog').modal('hide');
        		admin_tool.alert('msg_info', '添加成功', 'success');
        		window.location.reload();
        	}
        	else{
            	var json = value.data;
        		for(var key in json){
        			$('#' + key).attr({'data-placement':'bottom', 'data-content':json[key], 'data-toggle':'popover'}).addClass('popover-show').popover('show');
        			
        		}
        	}

    	}
    });
});

 
</script>
<?php $this->endBlock(); ?>